package com.qdrtme.landemo.api;

import android.content.Context;

import com.qdrtme.landemo.BaseApi;

import org.json.JSONException;

import java.util.HashMap;

/**
 * @Created by taylor on 12/11/17.
 * @class description 重设密码（手机短信找回密码）
 */

public class SmsResetPasswordApi extends BaseApi {

    private String mobile;
    private String verify;
    private String newpassword;
    private String repassword;
    private String tenantid;

    public SmsResetPasswordApi(Context c) {
        super(c);
    }


    @Override
    protected String getURL() {
        return BaseApi.RESET_PASSWORD;
    }

    @Override
    protected void getParams(HashMap<String, Object> params) {
        super.getParams(params);
        params.put("mobile", mobile);
        params.put("verify", verify);
        params.put("newpassword", newpassword);
        params.put("repassword", repassword);
        params.put("tenantid", tenantid);
    }

    @Override
    protected boolean analysisOutput(String result) throws JSONException {
        return true;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public void setVerify(String verify) {
        this.verify = verify;
    }

    public void setNewpassword(String newpassword) {
        this.newpassword = newpassword;
    }

    public void setRepassword(String repassword) {
        this.repassword = repassword;
    }

    public void setTenantid(String tenantid) {
        this.tenantid = tenantid;
    }
}
